package hari4.tes.soal1;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.LineIterator;

public class StripDebug{
	public static void main(String[] args) throws IOException {
		
		String input = "src/hari4/tes/soal1/Demo.java.bak";
		File filein = new File(input);		
		
		String outStream = "src/hari4/tes/soal1/Demo.java";
		File fileout = new File(outStream);
				
		LineIterator it = FileUtils.lineIterator(filein, "UTF-8");
		
		ArrayList<String> teks = new ArrayList<String>();
		
		while(it.hasNext()) {
			String line = it.nextLine();
			if(line.contains("/**dbg**/")==false) {
				System.out.println(line);
				teks.add(line);
			}
		}
		
		FileUtils.writeLines(fileout, teks);
		
	}
}
